Borland SQL Link Connection to INFORMIX
Borland SQL Link: Connecting to InterBase

To get help on an item, click the underlined text. For an overview of what the SQL Link driver is and how it works, see Essentials first.

	Essentials -- Read this section for a brief overview of Borland SQL Links for Windows.
	Configuring the driver -- Follow these procedures to configure the SQL Link InterBase driver.
	Creating an alias -- Information you need to create an InterBase alias.
	Connecting to InterBase -- How to connect to the InterBase database through your IDAPI application.
	Troubleshooting steps -- If you cannot establish an InterBase connection, follow these steps to try to isolate the problem.


SQL Link Essentials
Essentials

Borland® SQL Links for Windows is a collection of drivers that let you work with SQL data through supported Borland applications. The SQL Link driver enables the connection to the SQL server, translates queries into the appropriate SQL dialect, and passes them to the SQL database. When processing is complete, the SQL database returns the answer to the client in a format that the desktop application can display.

Note	Borland database applications also support the use of SQL statements against local (Paradox or dBASE) data. For information on how to use local SQL with your Borland database application, see your user documentation.

Supported Borland applications

Borland SQL Links works with any application that supports the Borland Database Engine (also known as IDAPI, the Integrated Database Application Programming Interface).  This includes Paradox for Windows, dBASE for Windows, Quattro Pro for Windows Database Desktop, and custom applications built using the Borland Database Engine.

Supported databases

Drivers in the SQL Links product package support InterBase, Informix, ORACLE, and SYBASE and Microsoft SQL Server databases.


Configuring the SQL Link Driver for InterBase
Configuring the SQL Link InterBase Driver

Creating an InterBase alias

After SQL Link InterBase driver installation is complete, the first thing you should do is configure the default parameters for the InterBase driver itself.

Driver Name lists all the available drivers.

New Driver enables you to add an ODBC driver connection to the list of available drivers.

Delete Driver enables you to delete an ODBC driver connection from the list of available drivers.

Parameters shows all the parameters with their current values.

Description briefly notes the purpose of the selected parameter.

To configure the InterBase driver, choose InterBase as the Driver Name and highlight the desired configuration parameters. Delete the old value and enter a new one in the appropriate text box.

Setting	Meaning

VERSION	Internal version number of the SQL Link InterBase driver.

TYPE	Type of server to which this driver helps you connect. Can be SERVER (SQL server) or FILE (standard, file-based server).

DLL	The name of the driver's Dynamic Link Library (SQLD_IB.DLL).

DRIVER FLAGS	Internal product-specific flag. Do not change without direct instructions from Borland support personnel.

SERVER NAME	Name of the target InterBase SQL server.

USER NAME	Default name for accessing the InterBase SQL server.

OPEN MODE	Mode in which SQL Link opens the InterBase database. Can be READ/WRITE (default) or READ ONLY.

SCHEMA CACHE SIZE	Number of SQL tables whose schema information will be cached. Can be any whole number from 0 to 32 (default=8).

LANGDRIVER	Language driver used to display SQL data. (US. default=blank) Choose the language driver that matches your InterBase server character set and collation sequence. If none of the language drivers supplied match, choose a language driver that matches the desired character set. [more]

SQLQRYMODE	Method for handling queries to SQL data. Can be NULL (blank setting; default), SERVER, or LOCAL. [more]

SQLPASSTHRU MODE	Specifies whether or not the desktop application will be able to access the InterBase SQL server via desktop queries and pass-through SQL queries in the same alias connection. Can be NOT SHARED, SHARED AUTOCOMMIT (default), or SHARED NO AUTOCOMMIT. [more]

SCHEMA CACHE TIME	Specifies how long table list information will be cached, in seconds.  Can be -1, 0, or any integer from 1 through 2,147,483,647.  [more]


The Alias Manager dialog box
Creating an InterBase Alias

Use the Alias Page to add, delete, or modify an InterBase alias.

Alias Name lists all the available aliases.

New Alias enables you to add a new alias.

Delete Alias enables you to delete any alias that is highlighted in the Alias Name box.

Parameters shows all the parameters with their current values.

Description briefly notes the purpose of the selected parameter.

The following parameters are displayed.

Setting	Meaning

TYPE	Type of server to which this driver helps you connect. Can be SERVER (SQL server) or FILE (standard, file-based server).

PATH	Reserved for future use.

SERVER NAME	Name of the target InterBase SQL server.

USER NAME	Default name for accessing the InterBase SQL server.

OPEN MODE	Mode in which SQL Link opens the InterBase database. Can be READ/WRITE (default) or READ ONLY.

SCHEMA CACHE SIZE	Number of SQL tables whose schema information will be cached. Can be any whole number from 0 to 32 (default=8).

LANGDRIVER	Language driver used to display SQL data. (US. default=blank) Choose the language driver that matches your InterBase server character set and collation sequence. If none of the language drivers match, choose a language driver that matches the desired character set. [more]

SQLQRYMODE	Method for handling queries to SQL data. Can be NULL (blank setting; default), SERVER, or LOCAL. [more]

SQLPASSTHRU MODE	Specifies whether or not the desktop application will be able to access the InterBase SQL server via desktop queries and pass-through SQL queries in the same alias connection. Can be NOT SHARED, SHARED AUTOCOMMIT (default), or SHARED NO AUTOCOMMIT. [more]

SCHEMA CACHE TIME	Specifies how long table list information will be cached, in seconds.  Can be -1, 0, or any integer from 1 through 2,147,483,647.  [more]


Connecting to InterBase
Connecting to InterBase Through Your IDAPI Application

Troubleshooting your InterBase connection

When you are within your IDAPI application you can connect to an InterBase database either automatically (by performing a database action) or manually (without performing a database action).

The object of the connection process is to determine whether you have the right to access the database, and, if so, what kind of access permission you have (READ/WRITE or READ ONLY).

The connection is made through your InterBase alias.

Connecting from Paradox for Windows or the Database Desktop

The first time you try to query or view a table in your InterBase database through Paradox for Windows, SQL Link displays the Database Information dialog box.  To complete the connection, enter your password in the Database Information dialog box and click OK.

If the connection is successful, your application continues with the operation you requested. The database to which you connected remains connected for the rest of the current session.

Connecting manually

If you ever want to connect to a database without first performing a database action, you can connect manually through the Paradox Alias Manager:

1.  Select Files | Aliases to open the Alias Manager dialog box.

2.  Choose the desired alias from the drop-down list in the Database Alias field; the Alias Manager displays the configuration of the selected alias.

3.  Enter your password and choose Connect.  If the connection is successful, the Alias Manager displays Connection is successful.  Database is open.

4.  To close the Alias Manager dialog box, click OK.

Disconnecting manually

To disconnect from the InterBase server without exiting Paradox, redisplay the Alias Manager and choose Disconnect.

Connecting from dBASE for Windows

In dBASE for Windows, you cant connect to the InterBase database without performing some kind of database action. However, you can start an action against the InterBase database in either of the following ways:

From the Navigator

1.	Open the Navigator and click the Tables from Database button; dBASE displays a list of the available database aliases.

2.	Double-click on the desired alias; dBASE displays the Open Database dialog box.

3.	Enter your password in the Open Database dialog box, then click OK.

If the connection is successful, the Navigator displays the tables available through the selected database.

From File | Open

1.	Select File | Open to open the Open File dialog box.

2.	Click the Databases button. dBASE displays the Open Table dialog box, which lists the available database aliases.

3.	Double-click on the alias that connects with the desired database; dBASE displays the Open Database dialog box.

4.	Enter your password in the Open Database dialog box and click OK.

If the connection is successful, the Open Table dialog box displays a list of tables available in the database to which you just connected.


Troubleshooting Steps
Troubleshooting Your InterBase Connection

If you have problems establishing an InterBase connection with SQL Link, try to isolate the problem the following way:

1	Run the CONNECT utility to determine if you can connect to the InterBase server from your client workstation. (For detailed information, see "Testing InterBase connection existence," in Chapter 1.)

If the CONNECT utility is successful, it returns the InterBase version ID of each link between your client workstation and the database.

If CONNECT is successful but you are unable to access your InterBase server database through your Borland desktop product, you may have installed SQL Link incorrectly. Reinstall SQL Link by following the procedures in Chapter 1.

Also, check the SERVICES file for the correct protocol for InterBase server access. The line should be similar to:

gds_db                  3050/tcp

2	If the CONNECT utility is unsuccessful, test the lower-level protocols:

Note: The following steps require a TELNET program and a PING program. These DOS programs are not included in the SQL Link product package, but they are available from your TCP/IP network software vendor. (Your TCP/IP network software package may use different names for these programs.)

If you do not have these programs on your client workstation, ask your network administrator to perform these tests for you.

1	Enter the TELNET command to ensure that the TCP libraries are correctly installed.

If the TCP libraries are correctly installed, the login: prompt is displayed. Login to the network and check for the presence of the database you are trying to attach.

If the message can't resolve hostname is displayed, check your workstation HOSTS file to ensure that you have an entry for your host name and IP address. The entry looks similar to:

128.127.50.12          mis_server

If TELNET is successful and CONNECT is not, you may have a problem with your InterBase installation. See your database administrator for assistance.

2	PING the server to check that the InterBase server itself is running and visible to your desktop application. (If PING is successful, the message servername is alive is displayed.)

If PING is successful but the TELNET command is not, there may be a problem with the inet daemon.

If you cannot PING the server, you may have a routing problem. Report the problem to your network administrator.

Note: If you don't have PING on your DOS client, you can PING the DOS client from the server node (if you have access to the server node). Ask your network administrator for instructions.

If you can successfully attach the database from the server node, but not from your DOS client, you may not have a login set in the security database, isc.gdb. See your database administrator for assistance.


Modifying an InterBase Alias

To modify an InterBase alias, highlight the alias and the parameter you want to change, then enter a new value in place of the old one.


Adding a New InterBase Alias

To create a new InterBase alias, click the New Alias button.which displays the Add New Alias dialog box. (The new alias starts with the default alias type: STANDARD.)

Enter a name for the new alias and select the InterBase alias type.


Deleting an InterBase Alias

To delete an InterBase alias, highlight the alias you want to delete, then click the Delete Alias button. Reconfirm by clicking Yes in the Delete Alias dialog box.


LANGDRIVER Settings

Long driver name	Short name	Subtype

Paradox 'ascii'	ascii	0,1,100,101

Borland DAN Latin-1	BLLT1DA0	139

DEU LATIN 1	BLLT1DE0	144

ENG LATIN 1	BLLT1UK0	152

ENU LATIN 1	BLLT1US0	153

ESP LATIN 1	BLLT1ES0	149

FIN LATIN 1	BLLT1FI0	141

FRA LATIN 1	BLLT1FR0	142

FRC LATIN 1	BLLT1CA0	143

ISL LATIN 1	BLLT1IS0	145

ITA LATIN 1	BLLT1IT0	146

NLD LATIN 1	BLLT1NL0	140

NOR LATIN 1	BLLT1NO0	105

PTG LATIN 1	BLLT1PT0	154

Paradox INTL	INTL	102

Pdox NORDAN4	NORDAN40	105

Pdox SWEDFIN	SWEDFIN	106

SVE LATIN 1	BLLT1SV0	151


SQLQRYMODE Settings

Setting	Meaning
NULL (blank setting)	Server-local mode (default). Query goes first to the InterBase server. If the server is unable to perform the query, the query is performed at the desktop.
SERVER	Server-only mode. Query is sent to the InterBase server. If the server is unable to perform the query, the query fails.
LOCAL	Local-only mode. Query is always performed at the desktop.


SQLPASSTHRU MODE Settings

Setting	Meaning
NOT SHARED  (blank setting)	Pass-through SQL and non-pass-through SQL do NOT share the same connection.
SHARED AUTOCOMMIT	(Default mode) Pass-through SQL and non-pass-through SQL will share the same connection, and (as long as you are not in an explicit client transaction or batch mode) pass-through SQL will be automatically committed.
SHARED NOAUTOCOMMIT	Pass-through SQL and non-pass-through SQL share the same connection, but pass-through statements will not be automatically committed.
For further information, see Connecting to InterBase.


LOCK MODE Settings

Setting	Equiv. SQL statement	Meaning
-1	SET LOCK MODE TO WAIT	Suspends the process until the lock is released.
0	SET LOCK MODE TO NOT WAIT	Ends the operation immediately and returns an error code. This is the InterBase default, which the Borland SQL Link driver now overrides.
1 - 32,776	SET LOCK MODE TO WAIT n	(Default=5) Suspends the process until the lock is released, or until the end of the specified number of seconds.*.
* In versions of InterBase which do not support the seconds option, any non-zero value causes the process to wait until the lock is released


SCHEMA CACHE TIME Settings

Setting	Meaning
-1	(Default). The table list is cached until you close the database.
0	No table lists are cached.
1 through 2147483647	The table list is cached for the number of seconds specified in the setting.